<template>
    <router-view/>
</template>

<script setup>
import router from "@/router";
import {useRoute} from "vue-router";
import {SERIES} from "@/assets/server";


const route = useRoute()
// 如进入学生端跳转到学生index页面

watch(() => router.currentRoute.value.name, (pathName) => {
    //监视路由名称
    if (pathName === 'Student') {
        console.log("SERIES", SERIES)
        console.log("pathName", pathName)
        if (SERIES === "second") {
            router.push({name: "StudentIndexSecond"})
        } else if (SERIES === "first") {
            router.push({name: "StudentIndexFirst"})
        } else {
            router.push({name: 'StudentIndex'})
        }
    }
}, {immediate: true, deep: true})


</script>

<style scoped lang="less">

</style>